/**
 * @param {number} n
 * @return {number}
 */
var fib = function(n) {
    if(n<2) return n;
    let a = 0;
    let b = 1;
    let res = a+b;
    for(let i = 2;i<n;i++){
        a = b;
        b = res;
        res = (a+b)%(1000000007);
    }
    // console.log(res)
    // console.log(701408733+433494437)  //44+43  喔喔原来要取模（取余）
    return res
};
